package com.example.demo.zabbix.request.builder.host;

import com.example.demo.zabbix.request.BaseRequest;
import com.example.demo.zabbix.request.builder.request.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/hostinterface/update
 */
public class HostInterfaceUpdateRequestBuilder extends UpdateRequestBuilder {
    private String interfaceId;
    public HostInterfaceUpdateRequestBuilder(String auth) {
        super("hostinterface.update", auth);
    }

    public HostInterfaceUpdateRequestBuilder(Long id, String auth) {
        super("hostinterface.update", id, auth);
    }

    public String getInterfaceId() {
        return interfaceId;
    }

    public HostInterfaceUpdateRequestBuilder setInterfaceId(String interfaceId) {
        this.interfaceId = interfaceId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("interfaceid",interfaceId);
        return baseRequest;
    }
}
